/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-07-19
 * Time: 10:27
 */
class MyArray2<T>{
    public T[] arr =(T[]) new Object[10];

    public T getArray(int pos){
        return arr[pos];
    }
    public void setArr(int pos ,T val){
        this.arr[pos] = val;
    }
}
public class Test0 {
    public static void main(String[] args) {
        MyArray2<String> myArray = new MyArray2<String>();
        myArray.setArr(0,"18");
        myArray.setArr(1,"hello");
        String s = myArray.getArray(1);
        System.out.println(s);

        MyArray2<Integer> myArray2 = new MyArray2<Integer>();
        myArray2.setArr(0,18);
        myArray2.setArr(1,17);
        String s2 = myArray.getArray(1);
        System.out.println(s);

    }
}
